package cn.zhaopin.starter.security.manager;

import cn.zhaopin.starter.security.service.SecurityUserDetailService;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.ReactiveAuthenticationManager;
import org.springframework.security.core.Authentication;
import reactor.core.publisher.Mono;

/**
 * Description: 微信小程序授权登陆
 *
 * @author zuomin (myleszelic@outlook.com)
 * @date: 2021/10/29-13:52
 */
@Slf4j
public class WechatMpAuthenticationManager implements ReactiveAuthenticationManager {

    public final SecurityUserDetailService securityUserDetailService;
    private final ObjectMapper objectMapper;

    public WechatMpAuthenticationManager(SecurityUserDetailService securityUserDetailService) {
        this.securityUserDetailService = securityUserDetailService;
        objectMapper = new ObjectMapper();
    }

    @Override
    public Mono<Authentication> authenticate(Authentication authentication) {

        return null;
    }
}
